import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'

const routes: Array<RouteRecordRaw> = [
    {
        path: '/',
        name: 'main',
        component: () => import('../components/layout/VmMain.vue'),
        redirect: '/home',
        children:[
            {
                path: '/home',
                name: 'home',
                component: () => import('../view/HomeView.vue')
            }
        ]
    },
    {
        path: '/login',
        name: 'login',
        component: () => import('../view/LoginView.vue')
    },
]

const router = createRouter({
    history: createWebHashHistory(),
    routes
})

export default router